import { IOption } from '@/shared/interfaces';

export function normalizeData<T, U extends IOption>(options: T[], valueKey: keyof T, labelKey: keyof T): U[] {
  return options?.map((item) => ({
    value: item[valueKey],
    label: item[labelKey],
  })) as unknown as U[];
}
